package com.lcredu.aop.homework.xml;

import com.lcredu.aop.homework.Cal;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 黎长容
 * @date 2025-07-15 20:21
 */
public class CalAspectTest {
    @Test
    public void byXML() {
        ApplicationContext ioc = new ClassPathXmlApplicationContext("beans11.xml");
        com.lcredu.aop.homework.Cal cal = ioc.getBean(Cal.class);
        cal.cal1(10);
        System.out.println("===========XML==============");
        cal.cal2(5);
        System.out.println("ok!");
    }
}
